<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<a href="#" onclick="closeMe()">关闭此网页</a>
	</body>
	<script>
		function closeMe(){
			let isClosed = window.confirm('是否确定关闭此对话框')//点确定返回true 点取消返回false
			if(isClosed)// 说明用户点了确定
				window.close()
		}
	</script>
</html>
